    #This file is part of evolveolution.

    #evolveolution is free software: you can redistribute it and/or modify
    #it under the terms of the GNU General Public License as published by
    #the Free Software Foundation, either version 3 of the License, or
    #(at your option) any later version.

    #evolveolution is distributed in the hope that it will be useful,
    #but WITHOUT ANY WARRANTY; without even the implied warranty of
    #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #GNU General Public License for more details.

    #You should have received a copy of the GNU General Public License
    #along with evolveolution.  If not, see <http://www.gnu.org/licenses/>.
from evolve import *
from math import *
import sys,getopt;
def Usage ():
    print "Usage: evolveolution creaturespeed creatureenergy population size"
    print ""
    print "This game simulates the evolution of a species by you seeding the prey";
    print "and seeing the result when they fight the predator"
    print "";
    print "The stats you pass to the game should not add up to more than 10\n and none of them should be zero values";
    print "Please also make your values integers, otherwise my best guess is that you actually wanted lower";
    print "it truncates floating points";
    sys.exit(0)
optlist, list = getopt.getopt(sys.argv[1:], ':vphf:')
for opt in optlist:
    if opt[0] == '-h':
        Usage();
    if opt[0] == '--help':
    	Usage();    
if len(sys.argv)>1:
	speed = floor(float(sys.argv[1]));
	energy = floor(float(sys.argv[2]));
	pop = floor(float(sys.argv[3]));
	if (speed + energy + pop) > 10:
		print "your stats are too high";
	elif speed <= 0:	
		print "non positive values are not allowed";
	elif energy <= 0:
		print "non positive values are not allowed";	
	elif pop <=0:
		print "non positive values are not allowed";s
	else:		
		if game(speed,energy,pop) == 1:
			print "you won"
		else:
			print "you lost";	

else:
	print "Not enough arguments";
	Usage();
